
<div ng-form="ng-form" name="tplForm" ng-class="{'need-valid':needValid.valid}" class="mod-alarm alarm-tpl-detail">
  <loading ng-if="variables.isLoading||isEdit&amp;&amp;alarmTemplateIns.loadingIns.isLoading"></loading>
  <button ng-click="toggleEdit()" ng-if="!isEdit&amp;&amp;permission.role&amp;&amp;permission.role!='REPORTER'" class="ui-btn ui-btn-sm ui-btn-primary btn-edit">编辑</button>
  <button ng-click="toggleEdit()" ng-if="isEdit" class="ui-btn ui-btn-sm ui-btn-primary btn-edit">取消编辑</button>
  <ng-include src="'index/tpl/tplAlarmTemplate/tplAlarmTemplateInfo.html'" ng-if="!isEdit"></ng-include>
  <ng-include src="'index/tpl/tplAlarmTemplate/tplAlarmTemplateEdit.html'" ng-if="isEdit"></ng-include>
  <div ng-if="isEdit" class="com-bottom-option"><span class="com-bottom-option-con"><a ng-click="toggleEdit()" class="ui-btn ui-btn-link ui-btn-md ui-btn-bright">返回</a>
      <button ng-disabled="variables.isLoading||alarmTemplateIns.loadingIns.isLoading" ng-click="needValid.valid=true;tplForm.$valid&amp;&amp;saveModify()" class="ui-btn ui-btn-md ui-btn-bright">保存修改</button><span ng-if="needValid.valid&amp;&amp;tplForm.$invalid" class="txt-error">存在不合法数据，请修改后提交。</span></span></div>
</div>